home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 26 / CU Amiga Magazine's Super CD-ROM 26 (1998)(EMAP Images)(GB)[!][issue 1998-09].iso / CUCD / Utilities / XPK / Developers / Include / Modula2 / XpkSubD.def < prev    next >
Text File  |  1998-02-08  |  4KB  |  83 lines

  1. (*#-- BEGIN AutoRevision header, please do NOT edit!
  2. *
  3. * $VER: XpkSubD.def 1.0 (13.10.97)
  4. * Auth: T.B. (tonyiommi@geocities.com)
  5. *
  6. * Desc: XPKSub Defs, you need them to write your own packer libs.
  7. *       xpksub.h 4.10 (05.04.97) by SDI
  8. * Reqs: AMIGA OS 2.0
  9. * Lang: MODULA-2
  10. * Comp: Cyclone © by M. Timmermans
  11. *-- END AutoRevision header --*)
  12.  
  13. DEFINITION MODULE XpkSubD; (*$ Implementation- *)
  14.  
  15. FROM SYSTEM IMPORT ADDRESS;
  16. FROM XpkMasterD IMPORT ModePtr,StrPtr;
  17.  
  18. (* --- The XpkInfo structure --- *)
  19.  
  20. (*
  21.  * Sublibs return this structure to xpkmaster when asked nicely
  22.  * This is version 1 of XpkInfo. It's not #define'd because we don't want
  23.  * it changing automatically with recompiles - you've got to actually update
  24.  * your code when it changes.
  25. *)
  26.  
  27. TYPE
  28.  InfoPtr = POINTER TO Info;
  29.  Info=RECORD
  30.     infoVersion,                (* Version number of this structure        *)
  31.     libVersion,                 (* The version of this sublibrary          *)
  32.     masterVersion,              (* The required master lib version         *)
  33.     modesVersion    :INTEGER;   (* Version number of mode descriptors      *)
  34.     name,                       (* Brief name of the packer, 20 char max   *)
  35.     longName,                   (* Full name of the packer   30 char max   *)
  36.     description     :StrPtr;    (* Short packer desc., 70 char max         *)
  37.     id,                         (* ID the packer goes by (XPK format)      *)
  38.     flags,                      (* Defined below                           *)
  39.     maxPkInChunk,               (* Max input chunk size for packing        *)
  40.     minPkInChunk,               (* Min input chunk size for packing        *)
  41.     defPkInChunk    :LONGINT;   (* Default packing chunk size              *)
  42.     packMsg,                    (* Packing message, present tense          *)
  43.     unpackMsg,                  (* Unpacking message, present tense        *)
  44.     packedMsg,                  (* Packing message, past tense             *)
  45.     unpackedMsg     :StrPtr;    (* Unpacking message, past tense           *)
  46.     defMode,                    (* Default mode number                     *)
  47.     pad             :INTEGER;   (* for future use                          *)
  48.     modeDesc        :ModePtr;   (* List of individual descriptors          *)
  49.     reserved        :ARRAY[0..5] OF LONGINT;    (* Future expansion - set to zero          *)
  50.  END;
  51.  
  52. (* --- defines for Flags: see xpk.h, XPKIF_xxxxx --- *)
  53.  
  54. (* The XpkSubParams structure *)
  55.  SubParamsPtr = POINTER TO SubParams;
  56.  SubParams=RECORD
  57.     inBuf       :ADDRESS;   (* The input data               *)
  58.     inLen       :LONGINT;   (* The number of bytes to pack  *)
  59.     outBuf      :ADDRESS;   (* The output buffer            *)
  60.     outBufLen,              (* The length of the output buf *)
  61.     outLen,                 (* Number of bytes written      *)
  62.     flags,                  (* Flags for master/sub comm.   *)
  63.     number,                 (* The number of this chunk     *)
  64.     mode        :LONGINT;   (* The packing mode to use      *)
  65.     password    :StrPtr;    (* The password to use          *)
  66.     libVersion,             (* SublibVersion used to pack   *)
  67.     pad         :INTEGER;   (* Reserved; don't use          *)
  68.     arg         :ARRAY[0..2] OF LONGINT;    (* Reserved; don't use  *)
  69.     sub         :ARRAY[0..3] OF LONGINT;    (* Sublib private data  *)
  70.  END;
  71.  
  72. (*
  73.  * xsp_LibVersion is the version number of the sublibrary used to pack
  74.  * this chunk. It can be used to create backwards compatible sublibraries
  75.  * with a totaly different fileformat.
  76.  *)
  77.  
  78. CONST
  79.  sfStepDown     = 1;  (* May reduce pack eff. to save mem   *)
  80.  sfPrevChunk    = 2;  (* Previous chunk available on unpack *)
  81.  
  82. END XpkSubD.